﻿CREATE TABLE [dbo].[AW_SaleTransaction] (
    [TransactionId]             UNIQUEIDENTIFIER NOT NULL,
    [PropertyId]                UNIQUEIDENTIFIER NOT NULL,
    [InvoiceNumber]             NVARCHAR (50)    NULL,
    [OpenFileRef]               NVARCHAR (MAX)   NULL,
    [CloseFileRef]              NVARCHAR (MAX)   NULL,
    [ListerId]                  UNIQUEIDENTIFIER NULL,
    [ListDate]                  DATETIME         NULL,
    [VendorType]                TINYINT          NULL,
    [VendorName1]               NVARCHAR (250)   NULL,
    [VendorName2]               NVARCHAR (250)   NULL,
    [VendorName3]               NVARCHAR (250)   NULL,
    [VendorCompany]             NVARCHAR (250)   NULL,
    [VendorNRIC1]               NVARCHAR (20)    NULL,
    [VendorNRIC2]               NVARCHAR (20)    NULL,
    [VendorNRIC3]               NVARCHAR (20)    NULL,
    [VendorCompanyNo]           NVARCHAR (50)    NULL,
    [VendorContactPerson]       NVARCHAR (250)   NULL,
    [VendorAddress]             NVARCHAR (250)   NULL,
    [VendorPhone]               NVARCHAR (250)   NULL,
    [VendorMobile]              NVARCHAR (50)    NULL,
    [VendorFax]                 NVARCHAR (250)   NULL,
    [VendorEmail]               NVARCHAR (250)   NULL,
    [VendorReferral]            TINYINT          NULL,
    [VendorReferralName]        NVARCHAR (250)   NULL,
    [VendorReferralNRIC]        NVARCHAR (20)    NULL,
    [VendorReferralContact]     NVARCHAR (250)   NULL,
    [VendorReferralStatus]      TINYINT          NULL,
    [VendorReferralAmount]      DECIMAL (18, 2)  NULL,
    [VendorReferralAmtSum]      DECIMAL (18, 2)  NULL,
    [AgencyFee]                 DECIMAL (18, 2)  NULL,
    [GST]                       DECIMAL (18, 2)  NULL,
    [GSTPaidBy]                 TINYINT          NULL,
    [ListingFee]                DECIMAL (18, 2)  NULL,
    [VendorSolicitorCompany]    NVARCHAR (250)   NULL,
    [VendorSolicitorName]       NVARCHAR (500)   NULL,
    [VendorSolicitorEmail]      NVARCHAR (250)   NULL,
    [VendorSolicitorAddress]    NVARCHAR (250)   NULL,
    [VendorSolicitorPhone]      NVARCHAR (250)   NULL,
    [VendorSolicitorFax]        NVARCHAR (250)   NULL,
    [PurchaserType]             TINYINT          NULL,
    [PurchaserName1]            NVARCHAR (250)   NULL,
    [PurchaserName2]            NVARCHAR (250)   NULL,
    [PurchaserName3]            NVARCHAR (250)   NULL,
    [PurchaserCompany]          NVARCHAR (250)   NULL,
    [PurchaserNRIC1]            NVARCHAR (250)   NULL,
    [PurchaserNRIC2]            NVARCHAR (250)   NULL,
    [PurchaserNRIC3]            NVARCHAR (250)   NULL,
    [PurchaserCompanyNo]        NVARCHAR (50)    NULL,
    [PurchaserContactPerson]    NVARCHAR (250)   NULL,
    [PurchaserAddress]          NVARCHAR (250)   NULL,
    [PurchaserPhone]            NVARCHAR (250)   NULL,
    [PurchaserMobile]           NVARCHAR (50)    NULL,
    [PurchaserFax]              NVARCHAR (250)   NULL,
    [PurchaserEmail]            NVARCHAR (250)   NULL,
    [PurchaserReferral]         TINYINT          NULL,
    [PurchaserReferralName]     NVARCHAR (250)   NULL,
    [PurchaserReferralNRIC]     NVARCHAR (20)    NULL,
    [PurchaserReferralContact]  NVARCHAR (250)   NULL,
    [PurchaserReferralStatus]   TINYINT          NULL,
    [PurchaserReferralAmount]   DECIMAL (18, 2)  NULL,
    [PurchaserReferralAmtSum]   DECIMAL (18, 2)  NULL,
    [DisbursementFee]           DECIMAL (18, 2)  NULL,
    [PurchaserSolicitorCompany] NVARCHAR (250)   NULL,
    [PurchaserSolicitorName]    NVARCHAR (500)   NULL,
    [PurchaserSolicitorEmail]   NVARCHAR (250)   NULL,
    [PurchaserSolicitorAddress] NVARCHAR (250)   NULL,
    [PurchaserSolicitorPhone]   NVARCHAR (250)   NULL,
    [PurchaserSolicitorFax]     NVARCHAR (250)   NULL,
    [TransactorId]              UNIQUEIDENTIFIER NULL,
    [CoBroke]                   TINYINT          NULL,
    [CoBrokeId]                 UNIQUEIDENTIFIER NULL,
    [TransactDate]              DATETIME         NULL,
    [TransactRemark]            NVARCHAR (MAX)   NULL,
    [TransListType]             TINYINT          NULL,
    [TransactedPrice]           DECIMAL (18, 2)  NULL,
    [Deposit]                   DECIMAL (18, 2)  NULL,
    [PaymentType]               TINYINT          NULL,
    [PaymentDate]               DATETIME         NULL,
    [Requisition]               NVARCHAR (500)   NULL,
    [CreateDate]                DATETIME         NULL,
    [UpdateDate]                DATETIME         NULL,
    [UpdateWho]                 UNIQUEIDENTIFIER NULL,
    [Status]                    TINYINT          NULL,
    [TotalAgencyFee]            DECIMAL (18, 2)  NULL,
    [ListerAmt]                 DECIMAL (18, 2)  NULL,
    [ReferralAmt]               DECIMAL (18, 2)  NULL,
    [GovAmt]                    DECIMAL (18, 2)  NULL,
    [GrossAmount]               DECIMAL (18, 2)  NULL,
    [SignDate]                  DATETIME         NULL,
    [SignRemark]                NVARCHAR (MAX)   NULL,
    [SignComplete]              TINYINT          NULL,
    [SignCompleteBy]            UNIQUEIDENTIFIER NULL,
    [SignCompleteDate]          DATETIME         NULL,
    [SNPDate]                   DATETIME         NULL,
    [CollectDate]               DATETIME         NULL,
    [CollectAmt]                DECIMAL (18, 2)  NULL,
    [CollectComplete]           TINYINT          NULL,
    [CollectRemark]             NVARCHAR (MAX)   NULL,
    [CollectCompleteBy]         UNIQUEIDENTIFIER NULL,
    [CollectCompleteDate]       DATETIME         NULL,
    [UndoDate]                  DATETIME         NULL,
    [UndoRemark]                NVARCHAR (MAX)   NULL,
    [UndoAmt]                   DECIMAL (18, 2)  NULL,
    [UndoBy]                    UNIQUEIDENTIFIER NULL,
    [UndoAgencyFee]             DECIMAL (18, 2)  NULL,
    [UndoGST]                   DECIMAL (18, 2)  NULL,
    [UndoGSTPaidBy]             TINYINT          NULL,
    [UndoListerAmt]             DECIMAL (18, 2)  NULL,
    CONSTRAINT [PK_AW_SaleTransaction] PRIMARY KEY CLUSTERED ([TransactionId] ASC, [PropertyId] ASC)
);




GO



GO



GO



GO



GO



GO



GO



GO



GO



GO



GO



GO



GO



GO



GO


